Files
It is possible to send files (images, config files, ...) to the Capture Edge, over any protocol that supports strings.
The message can either contain the base64 encoded contents of the file, or a file path.
The syntax to use when encoding the file in base64
data:{mimetype};[ext={extension}];[dstPath={destinationPath}];[sync={sync}];base64,{base64EncodedFile}
Field | Required | Description |
---|---|---|
mimetype | Yes | Mimetype of the file. Example: plain/text |
extension | No, but recommended | Extension of the file. If it isn't provided, the first known extension for the provided mimetype is used. |
dstpath | No | The relative path where to store the file (both locally and in the cloud) . If not provided, a random path will be generated. |
sync | No | If set to 'yes', the file will be synced to the cloud. Default: no. |
base64EncodedFile | Yes | The Base64 encoded file. |
Examples:
data:image/jpeg;ext=jpg;base64,ABCDEF0123456789
data:plain/text;ext=txt;sync=true;dstpath=configFiles/myapp/config1.txt;base64,ABCDEF0123456789
The syntax to use when using file path
data:{mimetype};isFilePath=yes;[ext={extension}];[dstPath={destinationPath}];[sync={sync}];base64,{filePath}
Field | Required | Description |
---|---|---|
mimetype | Yes | Mimetype of the file. Example: plain/text |
isFilePath | Yes | This indicates the content is a path |
dstpath | No | The relative path where to store the file (both locally and in the cloud) . If not provided, a random path will be generated. |
sync | No | If set to 'yes', the file will be synced to the cloud. Default: no. |
filePath | Yes | The path to the file, accessible for the collector service. |
Examples:
data:image/jpeg;isFilePath=true,/mnt/drive1/file1.jpg
data:plain/text;sync=true;dstpath=configFiles/myapp/config1.txt;isFilePath=true,C:\myapp\config\config.conf
Blob store configuration
The company of the device/gateway needs a blob store configured to store these files in the cloud. In the Capture portal, tab 'identity & access mgmt', select the company. Then open the 'Blob stores' tab and click 'Add blob store' in the top right corner.